/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 黎鹤舞
 * Date: 2024-02-01
 * Time: 23:47
 */
import java.util.PriorityQueue;
import java.util.Queue;

/**
 * @Author 12629
 * @Description：
 */
class Student {

}
public class Test {
    public static void main3(String[] args) {
        PriorityQueue<Student> priorityQueue = new PriorityQueue<>();
        priorityQueue.offer(null);
    }
    public static void main2(String[] args) {

        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();
        priorityQueue.offer(10);
        priorityQueue.offer(4);
        priorityQueue.offer(8);
        priorityQueue.offer(3);


        System.out.println(priorityQueue.poll());
        System.out.println(priorityQueue.poll());


    }
    public static void main(String[] args) {
        int[] array = { 27,15,19,18,28,34,65,49,25,37};
        TestHeap testHeap = new TestHeap();
        testHeap.initElem(array);
        //O(n)  、O(n*logn)
        testHeap.createBigHeap();
        System.out.println("====");
        //O(n*logn)
        testHeap.heapSort();
        System.out.println("====");

        /*System.out.println(testHeap.poll());
        System.out.println("====");
        testHeap.offer(80);
        System.out.println("====");*/

    }
}
